home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / comm / mebbs / shellid100.lha / ShellID / Install_ShellID next >
Text File  |  1995-05-18  |  4KB  |  130 lines

  1. ; $VER: UserID Install 2.01 (12.22.94) by Jason Gouger
  2.  
  3. (set source-dir (pathonly (expandpath @icon)))
  4.  
  5. (procedure install-exit
  6.     (complete 100)
  7.     (transcript "\nPlease support the ShareWare concept.\n")
  8.     (set @default-dest ShellID-Dir)
  9.     (exit @app-name" is ShareWare\n\nPlease support the ShareWare concept!")
  10. )
  11.  
  12. (procedure select-destination-directory
  13.     (set destdir
  14.         (askdir
  15.             (prompt "In which drawer should "@app-name" be installed?") 
  16.             (help "You should install "@app-name" in the Doors Path defined in the MEBBSNet configuration.")
  17.             (default "DOORS:")
  18.            (newpath)
  19.         )
  20.     )
  21.     (set ShellID-Dir(tackon destdir "ShellID"))
  22. )
  23.  
  24. (procedure copy-ShellID-prg
  25.     (copyfiles
  26.         (source source-dir) (dest ShellID-Dir)
  27.         (pattern "ShellID")
  28.         (files)
  29.     )
  30. )
  31.  
  32. (procedure copy-ShellID-doc
  33.     (transcript "\nCopying documentation...\n")
  34.     (copyfiles
  35.         (source source-dir) (dest ShellID-Dir)
  36.         (pattern "ShellID.guide")
  37.         (files)
  38.         (if(= 1 install-icons) (infos))
  39.     )
  40.     (if ((exists "SYS:Utilities/MultiView")) 
  41.         (tooltype(
  42.             (dest (tackon ShellID-Dir "ShellID.guide"))
  43.             (setdefaulttool "SYS:Utilities/MultiView")
  44.         ))
  45.         (tooltype(
  46.             (dest (tackon ShellID-Dir "ShellID.guide"))
  47.             (setdefaulttool "SYS:Utilities/AmigaGuide")
  48.         ))
  49.     )
  50. )
  51.  
  52. (procedure make-ShellID-dir
  53.     (if(= 0 install-icons) (makedir(ShellID-Dir)))
  54.     (if(= 1 install-icons) (makedir(ShellID-Dir) (infos)))
  55. )
  56.  
  57. (procedure ask-install-icons
  58.     (set install-icons 0)
  59.     (if (askbool
  60.         (prompt "Would you like the icons installed for ShellID?")
  61.         (help "Selecting YES to this option will create the respective icons so that "
  62.                 "the directory and documentation may be accessed through WorkBench."))
  63.         ((set install-icons 1))
  64.     )
  65. )
  66.  
  67. (procedure copy-ShellID-Shell
  68.     (transcript "\nCopying Example Script file...\n")
  69.     (copyfiles
  70.         (source source-dir) (dest ShellID-Dir)
  71.         (pattern "ShellID.SCP")
  72.         (files)
  73.         (if(= 1 install-icons) (infos))
  74.     )
  75. )
  76.  
  77. (procedure add-ShellID-menu
  78.     (if (askbool
  79.         (prompt "Would you like to add the example ShellID Remote Shell to a menu?")
  80.         (help "Selecting YES to this option will allow you to add the example "
  81.                 "Remote Shell to a Menu.  The menu option will have a minumum access "
  82.               "of 31."))
  83.         ((set menu-file (askfile
  84.             (prompt "Select the Menu File you would like the Remote Shell added to.")
  85.             (help "Select a valid NON COMPILED MENU FILE (#?.Menu) for the menu option "
  86.                     "to be appended.")
  87.             (default "MEBBSNet:Menus/MessageMenu.Menu"))
  88.         )
  89.  
  90.         (if (= 1 (exists menu-file)) (
  91.             (set menuop "xx")
  92.             (while (< 1 (strlen menuop))
  93.             (set menuop
  94.                 (askstring
  95.                 (prompt "Select a valid MEBBSNet menu character that is NOT currently in "
  96.                           "the menu file:\n'"menu-file"':")
  97.                (default "")
  98.                (help "Choose ONE character to activate the ShellID door.  This character "
  99.                         "will be added as a menu option to access the door.\n\nNote: This "
  100.                         "character MUST be a VALID menu character.")
  101.             ))
  102.             (if (= 1 (strlen menuop))
  103.                 ((set menu-text ("\nOption '%s':\n   MinAccess 31\n   Function MultiRunDoor %s\n   end" menuop (tackon ShellID-Dir "ShellID")))
  104.                 (set dash-txt "--------------------------------------------------")
  105.                 (if (askbool
  106.                     (prompt "Are you sure you would like to append the the following menu option "
  107.                               "to the Menu File '"menu-file"'?\n\n\n"dash-txt menu-text "\n" dash-txt"\n\n")
  108.                     (help "Selecting YES to this option will append:\n\n"dash-txt menu-text "\n" dash-txt"\n\n"
  109.                             "to the '"menu-file"' file.\n\n"
  110.                             "Warning: If you select an incorrect menu/option you may corrupt your "
  111.                             "menu configuration file!"))
  112.                     ((textfile (dest menu-file) (include menu-file) (append (cat menu-text "\n")))
  113.                         (set @execute-dir (pathonly menu-file))
  114.                         (run (cat "MEBBSNet:c/MenuCompiler " (fileonly menu-file))))
  115.                 )
  116.             ))))
  117.         )
  118.     ))
  119. )
  120.  
  121. (complete 00) (transcript "Installation script for " @app-name ".")
  122. (complete 10) (select-destination-directory)
  123. (complete 20) (ask-install-icons)
  124. (complete 30) (make-ShellID-dir)
  125. (complete 40) (copy-ShellID-prg)
  126. (complete 60) (copy-ShellID-doc)
  127. (complete 80) (copy-ShellID-Shell)
  128. (complete 90) (add-ShellID-menu)
  129. (install-exit)
  130.